<template>
  <van-popover
    v-model="showPopover"
    theme="dark"
    trigger="click"
    placement="bottom-start"
    :actions="actions"
    :offset="offset"
    @select="selectHandle"
  >
    <template #reference>
      <van-icon name="ellipsis" />
    </template>
  </van-popover>
</template>
<script>
export default {
  name: "moredork",
  props: {
    actions: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  data() {
    return {
      showPopover: false,
      offset: [-10, 8],
    };
  },
  methods: {
    selectHandle(action, index) {
      this.$emit("moredockSelectHandle", action, index);
    },
  },
};
</script>
<style lang="less">
@base: 23.44rem;
.van-popover[data-popper-placement="bottom-end"] {
  .van-popover__arrow {
    right: (5 / @base);
  }
}
</style>
